﻿//-----------------------------------------------------------------------
// <copyright>
//     Copyright (c) Artur Mustafin. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Excel.Expressions.Compiler
{
    internal class Mul : CellExpression
    {
        private CellExpression _a;
        private CellExpression _b;

        public Mul(CellExpression a, CellExpression b)
        {
            _a = a;
            _b = b;
            Add(_a);
            Add(_b);
        }

        public override double Eval()
        {
            return _a * _b;
        }

#if DEBUG
        public override string ToString()
        {
            return string.Format("{0}*{1}", _a, _b);
        }
#endif
    }
}